﻿#include "callwaiting.h"
#include "ui_callwaiting.h"

CallWaiting::CallWaiting(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::CallWaiting)
{
    ui->setupUi(this);
    this->setWindowFlag(Qt::FramelessWindowHint);
    initToolButton();
}

CallWaiting::~CallWaiting()
{
    delete ui;
}

void CallWaiting::setText(const QString &text)
{
    ui->label->setText(text);
}

// 初始化按钮
void CallWaiting::initToolButton()
{
    ui->toolBtnCallCancel->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    ui->toolBtnCallCancel->setIcon(QIcon(":images/images/hangUp.png"));
    ui->toolBtnCallCancel->setIconSize(QSize(48, 48));
    ui->toolBtnCallCancel->setText("取消");
}

// 手动取消
void CallWaiting::on_toolBtnCallCancel_clicked()
{
//    close();
    Q_EMIT signal_manualCancel();
}

